#include <d3d9.h>
#include <d3dx9.h>
#include "sprite.h"
#include "Ro.h"

#pragma once

class CSanPham
{
public:
	CSanPham(void);
	CSanPham(LPDIRECT3DTEXTURE9, LPDIRECT3DDEVICE9, int, int, int, int, int, int);
	void setSpeed(int);
	void draw();
	void update();
	bool checkLifeTime();
	bool checkCollision(CRo* ro);
	int getType();
	SPRITE getProduct();
	~CSanPham(void);
protected:
	SPRITE sprite;
	HRESULT result;
	LPDIRECT3DDEVICE9 dev;
	LPD3DXSPRITE handler;
	LPDIRECT3DTEXTURE9 img;
	int x, y, w, h, speed, num;
};
